Public Class frmGettingStarted

    Private Sub frmGettingStarted_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
        MainWRDB.ShowGettingStarted = chkShowStartup.Checked
        SaveWindowPos(REGAPP, Me)
    End Sub

    Private Sub frmGettingStarted_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        GetWindowPos(REGAPP, Me)
        chkShowStartup.Checked = MainWRDB.ShowGettingStarted
        Navigate()
        MainWRDB.CloseSplashScreen()
    End Sub

    Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click
        Close()
    End Sub

    Private Sub btnHelp_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnHelp.Click
        MainForm.HelpContents()
    End Sub

    Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged
        Navigate()
    End Sub

    Private Sub Navigate()
        Dim tabname As String = TabControl1.SelectedTab.Text
        With CType(TabControl1.SelectedTab.Controls(0), WebBrowser)
            If .Url Is Nothing Then
                Dim rtfPath As String = DLLPath & "\Getting Started"
                If Debugger.IsAttached Then rtfPath = "C:\Projects\WRDB 5.0\Getting Started"
                .Navigate(String.Format("{0}\{1}.mht", rtfPath, tabname))
            End If
        End With
    End Sub

End Class